Skip to content

Conversation

@TalkingBadger
Copy link
Contributor

Motivation

When conducting MD simulations based on ASH singlepoint calculations, I needed the element specific hardness for the electrostatic embedding. While this might be a niche application, the required code changes are minimal and the default behavior is not changed.

Summary of the change

If 'elements' is given as the hardness_PC of the XTBTheory class during initialization, the atom symbols are written to the pcharge file. This allows xtb to use the element-specific hardness in the inputfile runmode.
I have changed the comment in __init__ to explain the change, as there was no docstring to be updated.

Testing

The changes were tested in MD simulations and the desired effect was confirmed by inspecting the pcharge file/observing alternated energies.

If 'elements' is given as the hardness, the atom symbols are written to the pcharge file, which lets xtb use its element specific parametrization for the hardness.
@RagnarB83
Copy link
Owner

Looks good, fine by me.

@RagnarB83 RagnarB83 merged commit 3b4182c into RagnarB83:master Dec 4, 2025
1 check passed
@TalkingBadger TalkingBadger deleted the pcelementhardness branch December 6, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants